package cn.edu.cqytxy;

import sun.nio.ch.ThreadPool;

import java.util.concurrent.*;

/**
 * @author yinjw
 */
public class ThreadPoolTest {

    public static void main(String[] args) {

        ThreadPoolExecutor threadPoolExecutor = new ThreadPoolExecutor(0, Integer.MAX_VALUE,
                60L, TimeUnit.SECONDS,
                new SynchronousQueue<Runnable>());


        ExecutorService executorService = Executors.newCachedThreadPool();
        executorService.submit(new Runnable() {
            @Override
            public void run() {
                System.out.println("线程开始执行");
            }
        });
    }
}
